/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package tclass;   
import java.io.Serializable;

/**
  * A description of the channel. 
  * This includes the datatype at each timeframe and the channel's name
  *
  *
  * 
  * @author Waleed Kadous
  * @version $Id: ChannelDesc.java,v 1.1.1.1 2002/06/28 07:36:16 waleed Exp $
  */

public class ChannelDesc implements Serializable {
  /** for serialization. */
  private static final long serialVersionUID = -2144120836326202479L;
    private String name; 
    private DataTypeI datatype; 

    /**
     * Make a new Channel. 
     * @param name Name of the channel. 
     * @param datatype Data type of this channel. 
     */ 

    public ChannelDesc(String name, DataTypeI datatype){
	this.name = name; 
	this.datatype = datatype; 
    }
    
    public String getName(){
	return name; 
    }
    
    public void setName(String name){
	this.name = name; 
    }
    public DataTypeI getDataType(){
	return datatype; 
    }

    public void setDataType(DataTypeI dt){
	this.datatype = dt; 
    }
    
    @Override
    public String toString(){
	String retval = "Channel " + name + "  " ; 
	retval += datatype.toString(); 
	return retval; 
    }
}
